<?php
/**
 * Created by PhpStorm.
 * User: zhang
 * Date: 2015/10/19
 * Time: 9:19
 */
//左侧导航通用性较高的部分
?>
<div id="menu">
    <div class="admin">
        <img class="admin-img float-l" src="assets/backend-img/menu-admin/admin-img.png"/>
        <p class="admin-text float-l">
            <span class="color-white">用户 / 小编</span><br/>
            <span class="font-s12">文档管理员</span>
        </p>
    </div>
    <div class="menu-li">
        <ul>
            <li><a class="menu" href="<?= Route::Url('index');?>">文档列表</a></li>
            <li><a class="article" href="<?= Route::Url('edit',['type'=>'add']);?>">添加文档</a></li>
        </ul>
    </div>
</div>
<script type="text/javascript">
    //左侧导航菜单切换
    $(function(){
        $('.menu-li a').hover(function(){
                $(this).addClass('hover');
            },function(){
                $(this).removeClass('hover');
            }
        )
        $('.menu-li a').on("click",function(){
            $('.menu-li a').removeClass('hover hovers');
            $(this).addClass('hovers');
        })
    });
    if($('.menu').text()==$('.rating').text()){
        $('.menu').addClass('hovers');
    }
    if($('.article').text()==$('.rating').text()){
        $('.article').addClass('hovers');
    }
</script>
